<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-8-9
 * Time: 下午 10:29
 */
class authorController
{
    private $model;
    private $view;

    /*初始化*/
    function __construct()
    {
        require('model/model.php');
        require('view/author.php');
        $this->model = new Model();
        $this->view = new Author();
    }

    /*验证中心*/
    public function author($param = null)
    {
        if ($param == null) {
            $this->view->fetchTip("未知");
        } else {
            $data = $this->model->author($param);
            $this->view->fetchAuthor($data,$param);
        }
    }

    /*验证登录*/
    public function login($param=null)
    {
        $this->view->fetchLogin($param);
    }

    /*退出登录*/
    public function logout($param)
    {
        $this->view->fetchLogOut($param);
    }
}